import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class TestPage extends StatefulWidget {
  @override
  _TestPageState createState() => _TestPageState();
}

class _TestPageState extends State<TestPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("测试页面"),
      ),
      body: Container(
        child: Column(
          children: <Widget>[
            Container(
              margin: EdgeInsets.only(top: 30),
              child: Center(
                child: Column(
                  children: <Widget>[
                    CircleAvatar(
                      radius: 90,
                      backgroundImage: NetworkImage(
                        "http://pics.sc.chinaz.com/files/pic/pic9/201911/zzpic21410.jpg",
                      ),
                    ),
                    Text("Tiger,26", style: TextStyle(fontSize: 28)),
                    Text("CEO"),
                    Text("西南大学"),
                  ],
                ),
              ),
            ),
            Container(
              margin: EdgeInsets.all(30),
              child: Row(
                children: <Widget>[
                  Stack(
                    children: <Widget>[
                      Container(
                        margin: EdgeInsets.only(left: 25, right: 30, top: 30),
                        height: MediaQuery.of(context).size.height / 5,
                        width: MediaQuery.of(context).size.width / 3.5,
                        child: Container(
                          margin: EdgeInsets.only(top: 40),
                          child: ListTile(
                            title: Text("石榴",style: TextStyle(
                              color: Colors.white,
                              fontSize: 20
                            ),),
                            subtitle: Container(
                              child: Column(
                                children: <Widget>[
                                  Text(
                                    "落叶乔木或灌木；单叶，通常对生或簇生\n",
                                    style:
                                    TextStyle(color: Colors.white, fontSize: 11),
                                  ),
                                  Text(
                                    "植物界",
                                    style: TextStyle(
                                      color: Colors.white,
                                      fontSize: 18
                                    ),
                                  )
                                ],
                              ),
                            )

                          ),
                        ),
                        decoration: BoxDecoration(
                            gradient: LinearGradient(
                              colors: [Color(0xFFfbabaa), Color(0xFFf7418c)],
                              begin: Alignment.topCenter,
                              end: Alignment.bottomCenter,
                            ),
                            boxShadow: [
                              //卡片阴影
                              BoxShadow(
                                  color: Colors.pink,
                                  offset: Offset(2.0, 2.0),
                                  blurRadius: 4.0)
                            ],
//                      borderRadius: new BorderRadius.vertical(top: Radius.circular(15),bottom: Radius.circular(10),), // 也可控件一边圆角大小
                            borderRadius: BorderRadius.only(
                                topLeft: Radius.circular(10),
                                topRight: Radius.circular(60),
                                bottomLeft: Radius.circular(10),
                                bottomRight: Radius.circular(10))),
                      ),
                      Container(
                        margin: EdgeInsets.only(left: 25),
                        child: Image.network(
                          "http://pics.sc.chinaz.com/Files/pic/icons128/7504/f5.png",
                          height: 80,
                          width: 80,
                        ),
                      ),
                    ],
                  ),
                  Stack(
                    children: <Widget>[
                      Container(
                        margin: EdgeInsets.only(left: 30, top: 30),
                        height: MediaQuery.of(context).size.height / 5,
                        width: MediaQuery.of(context).size.width / 3.5,
                        child:Container(
                          margin: EdgeInsets.only(top: 40),
                          child: ListTile(
                            title: Text("苹果",style: TextStyle(
                                color: Colors.white,
                                fontSize: 20
                            ),),
                            subtitle: Container(
                              child: Column(
                                children: <Widget>[
                                  Text(
                                    "中国是苹果生产大国，产量占苹果总产量的65%\n",
                                    style: TextStyle(
                                        color: Colors.white,
                                        fontSize: 11
                                    ),
                                  ),
                                  Text(
                                    "植物界",
                                    style: TextStyle(
                                      color: Colors.white,
                                      fontSize: 18
                                    ),
                                  )
                                ],
                              ),
                            ),
                            onTap: () {

                            },
                          ),
                        ),
                        decoration: BoxDecoration(
                            gradient: LinearGradient(
                              colors: [Color(0xaf1E90dd), Color(0xaf5d25cc)],
                              begin: Alignment.topCenter,
                              end: Alignment.bottomCenter,
                            ),
                            boxShadow: [
                              //卡片阴影
                              BoxShadow(
                                  color: Colors.blueAccent,
                                  offset: Offset(2.0, 2.0),
                                  blurRadius: 4.0)
                            ],
//                      borderRadius: new BorderRadius.vertical(top: Radius.circular(15),bottom: Radius.circular(10),), // 也可控件一边圆角大小
                            borderRadius: BorderRadius.only(
                                topLeft: Radius.circular(10),
                                topRight: Radius.circular(60),
                                bottomLeft: Radius.circular(10),
                                bottomRight: Radius.circular(10))),
                      ),
                      Container(
                        margin: EdgeInsets.only(left: 30),
                        child: Image.network(
                          "http://pics.sc.chinaz.com/Files/pic/icons128/7504/f4.png",
                          height: 80,
                          width: 80,
                        ),
                      ),
                    ],
                  )
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
